/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package utilidades;

import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;

/**
 *
 * @author Mauricio
 */
public class ValidaDecimal extends KeyAdapter {

	@Override
	public void keyTyped (KeyEvent e) {
		char caracter = e.getKeyChar ();

		if ((caracter < '0' || caracter > '9') && (caracter != KeyEvent.VK_BACK_SPACE || caracter != KeyEvent.VK_DELETE) && caracter != '.') {
			e.consume ();
		}
	}
}
